package com.hjxr.xmgl.web.service.impl;

import java.util.List;

import com.hjxr.xmgl.web.domain.QuotaEarlyWarning;
import com.hjxr.xmgl.web.mapper.QuotaEarlyWarningMapper;
import com.hjxr.xmgl.web.service.IQuotaEarlyWarningService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * 预警指标配置Service业务层处理
 *
 * @author hjxr
 * @date 2021-12-02
 */
@Service
public class QuotaEarlyWarningServiceImpl implements IQuotaEarlyWarningService
{
    @Autowired
    private QuotaEarlyWarningMapper quotaEarlyWarningMapper;

    /**
     * 查询预警指标配置
     *
     * @param ewId 预警指标配置ID
     * @return 预警指标配置
     */
    @Override
    public QuotaEarlyWarning selectQuotaEarlyWarningById(String ewId)
    {
        return quotaEarlyWarningMapper.selectQuotaEarlyWarningById(ewId);
    }

    /**
     * 查询预警指标配置列表
     *
     * @param quotaEarlyWarning 预警指标配置
     * @return 预警指标配置
     */
    @Override
    public List<QuotaEarlyWarning> selectQuotaEarlyWarningList(QuotaEarlyWarning quotaEarlyWarning)
    {
        return quotaEarlyWarningMapper.selectQuotaEarlyWarningList(quotaEarlyWarning);
    }

    /**
     * 新增预警指标配置
     *
     * @param quotaEarlyWarning 预警指标配置
     * @return 结果
     */
    @Override
    public int insertQuotaEarlyWarning(QuotaEarlyWarning quotaEarlyWarning)
    {
        return quotaEarlyWarningMapper.insertQuotaEarlyWarning(quotaEarlyWarning);
    }

    /**
     * 修改预警指标配置
     *
     * @param quotaEarlyWarning 预警指标配置
     * @return 结果
     */
    @Override
    public int updateQuotaEarlyWarning(QuotaEarlyWarning quotaEarlyWarning)
    {
        return quotaEarlyWarningMapper.updateQuotaEarlyWarning(quotaEarlyWarning);
    }

    /**
     * 批量删除预警指标配置
     *
     * @param ewIds 需要删除的预警指标配置ID
     * @return 结果
     */
    @Override
    public int deleteQuotaEarlyWarningByIds(String[] ewIds)
    {
        return quotaEarlyWarningMapper.deleteQuotaEarlyWarningByIds(ewIds);
    }

    /**
     * 删除预警指标配置信息
     *
     * @param ewId 预警指标配置ID
     * @return 结果
     */
    @Override
    public int deleteQuotaEarlyWarningById(String ewId)
    {
        return quotaEarlyWarningMapper.deleteQuotaEarlyWarningById(ewId);
    }
}
